﻿using System;

namespace Map
{
    [Flags]
    public enum AutoTile4Corners
    {
        UpLeft = 0x1,
        UpRight = 0x2,
        DownLeft = 0x4,
        DownRight = 0x8
    }

    public enum AutoTileType
    {
        AutoTile4,
        AutoTile5,
    }

    public class AutoTileData
    {
        public AutoTileType Type;
        public TileStruct[] Tiles;

        public AutoTileData(AutoTileType type)
        {
            Type = type;
            Tiles = new TileStruct[Type == AutoTileType.AutoTile4 ? 16 : 25];
        }
        public AutoTileData(AutoTileType type, TileStruct[] tiles)
        {
            Type = type;
            Tiles = tiles;
        }

        public TileStruct this[int pos]
        {
            get { return Tiles[pos]; }
        }
    }

    public class AutoTile4Struct : TileStruct
    {
        public AutoTileData AutoData;
        public AutoTile4Corners Corners;
    }
}